package com.goldfish666.remote_control.entity.common;

import com.goldfish666.remote_control.entity.base.BaseKeyWithDistributedId;
import lombok.*;
import lombok.experimental.SuperBuilder;

import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToMany;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Inheritance(strategy = InheritanceType.JOINED)
//@BeanCopySource(source = InputDto.class, features = {CopyFeature.IGNORE_ALL_NULL_SOURCE_VALUE})
public class Command extends BaseKeyWithDistributedId {

    // 功能（温度、模式）
    private String name;

    // 值（18、制冷）
    private String value;

    // 位值
    @ManyToMany
    private List<ByteValue> bytes;

}
